package com.xbhog.screwdemo.demos;

import lombok.Data;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.util.List;

@Data
public class Emp {
    @NotBlank(message = "员工编号不能为空")
    private  String empNo;
    @NotBlank(message = "员工姓名不能为空")
    private  String empName;
    @NotBlank(message = "员工职位不能为空")
    private  String job;

    @Valid
    @NotEmpty(message = "部门列表不能为空")
    private List<Dept> dept;
}
 